
// 应用启动时初始化 totalViewCount
const initializeTotalViewCount = async (redis) => {
  try {
    const exists = await redis.exists("totalViewCount");
    if (!exists) {
      await redis.set("totalViewCount", 0);  // 初始化为0
    }
  } catch (error) {
    console.error("Error initializing totalViewCount:", error);
  }
};
module.exports  = initializeTotalViewCount;
